package com.maduar.mybatis.demo.util;

import java.util.Objects;

/**
 * Description:
 *
 * @author maduar maduar@163.com
 * @date 2021-04-18 10:27
 */
public class ErrorUtils {

    private ErrorUtils() {
    }

    public static void throwRuntimeError(String errorMessage) {
        throw new RuntimeException(errorMessage);
    }

    public static <T> void  isNullRuntimeError(T t, String errorMessage) {
        if (Objects.isNull(t)) {
            throw new RuntimeException(errorMessage);
        }
    }
}
